< previous page page_708 next page >

Page 708
exists for each rdoTable or rdoResultset object. All rdoColumn objects are stored in the rdoColumns collection.
Add a new button to the project. Set its Name to cmdRDOColumns and its Caption to Columns. Now add the code in Listing 18.12 to the cmdRDOColumns_Click event.
Type.gifListing 18.12. Coding the cmdRDOColumns_Click event.
Private Sub cmdRDOColumns_Click()
    '
    ' show rdo columns collection
    '
    Dim rdoEnv As rdoEnvironment
    Dim rdoCon As rdoConnection
    Dim rdoTbl As rdoTable
    Dim rdoCol As rdoColumn
    Dim strMsg As String
    '
    ' set up connection
    Set rdoEnv = rdoEngine.rdoCreateEnvironment("rdoTEMP", "admin", "")
    Set rdoCon = rdoEnv.OpenConnection("RDC Books5")
    '
    ' get table info
    rdoCon.rdoTables.Refresh
    Set rdoTbl = rdoCon.rdoTables("Authors")
    '
    ' get column info
    For Each rdoCol In rdoTbl.rdoColumns
        strMsg = strMsg & "AllowZeroLength=" & CStr(rdoCol.AllowZeroLength) &
arrow.gifvbCrLf
        strMsg = strMsg & "Attributes=" & Hex(rdoCol.Attributes) & vbCrLf
        strMsg = strMsg & "ChunkRequired=" & CStr(rdoCol.ChunkRequired) & vbCrLf
        strMsg = strMsg & "Name=" & rdoCol.Name & vbCrLf
        strMsg = strMsg & "OrdinalPosition=" & CStr(rdoCol.OrdinalPosition) &
arrow.gifvbCrLf
        strMsg = strMsg & "Required=" & CStr(rdoCol.Required) & vbCrLf
        strMsg = strMsg & "Size=" & CStr(rdoCol.Size) & vbCrLf
        strMsg = strMsg & "SourceColumn=" & rdoCol.SourceColumn & vbCrLf
        strMsg = strMsg & "SourceTable=" & rdoCol.SourceTable & vbCrLf
        strMsg = strMsg & "Type=" & CStr(rdoCol.Type) & vbCrLf
        strMsg = strMsg & "Updatable=" & CStr(rdoCol.Updatable) & vbCrLf
        '
        MsgBox strMsg, vbInformation, "rdoColumn"
        strMsg = ""
        '
    Next
    '
    rdoCon.Close
    rdoEnv.Close
    Set rdoCol = Nothing
    Set rdoTbl = Nothing
    Set rdoCon = Nothing
    Set rdoEnv = Nothing
    '
End Sub

 
< previous page page_708 next page >

If you like this book, buy it!